import { EventTask } from "../game/global"
/**
 * 房间防御检查
 */
 export class EventLogRoomTask implements IRoomTask{
  run(room: Room): void {
    const eventLog = room.getEventLog();
    for(const event of eventLog){
      // 查找是否有对应的事件任务
      var eventTask = EventTask.find((e)=> e.event === event.event);
      if(eventTask){
        eventTask.task.run(room,event);
      }
    }
  }
}